package com.xbongbong.pro.enums.menu.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.enums.AccessLinkEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import lombok.Getter;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2019/1/15 14:27
 * @desrcption 组织权限
 * @since v1.0
 */
@Getter
public enum OrganizationAuthorityEnum {

    /**
     * 组织权限枚举类
     */
    ORGANIZATION("enum.organizationAuthority.name.organization", "organization", AccessLinkEnum.ORGANIZATION, ProPermissionAliasEnum.ORGANIZATION.getAlias()),

    ROLE_PERMISSION("enum.organizationAuthority.name.role_permission", "rolePermission", AccessLinkEnum.ROLE_PERMISSION, ProPermissionAliasEnum.ROLE_PERMISSION.getAlias()),

    SHARE_PERMISSION("enum.organizationAuthority.name.share_permission", "sharePermission", AccessLinkEnum.SHARE_PERMISSION, ProPermissionAliasEnum.SHARE_PERMISSION.getAlias()),

//    COLLABORATOR("协同权限", "coUserPermission", AccessLinkEnum.COLLABORATOR),
    ;

    private String name;

    private String alias;

    private AccessLinkEnum accessLinkEnum;

    private String permission;

    OrganizationAuthorityEnum(String name, String alias, AccessLinkEnum accessLinkEnum, String permission){
        this.name = name;
        this.alias = alias;
        this.accessLinkEnum = accessLinkEnum;
        this.permission = permission;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

    public String getI18nName() {
        return name;
    }
}
